package com.top75;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: huangzhigao
 * @Date: 2023/5/10 21:08
 */
public class Code1431 {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        List<Boolean> res = new ArrayList<>(candies.length);
        int max = Integer.MIN_VALUE;
        for(int i:candies){
            max = Math.max(i,max);
        }
        for(int i = 0;i<candies.length;i++){
            if(candies[i]+extraCandies>=max){
                res.add(true);
            }else {
                res.add(false);
            }
        }
        return res;
    }
}
